module.exports = {
  outputDir: process.env.outputDir,
  assetsDir: 'static',
  baseUrl: '',
  css: {
    loaderOptions: {
      // pass options to sass-loader
      sass: {
        // @/ is an alias to src/
        // so this assumes you have a file named `src/variables.scss`
        data: `@import "@/style/variable.scss";`
      }
    }
  },
  runtimeCompiler: true,
  devServer: {
    open: true,
    host: '0.0.0.0',
    port: 8083,
    https: false,
    hotOnly: true,
    proxy: {
      '/lts': {
        // target: 'http://hx.dev.ybjfu.com/lts/',
        target: 'http://192.168.200.27/lts/',
        pathRewrite: { '^/lts': '' },
        changeOrigin: true,
        logLevel: 'debug'
      },
      // '/wapapi': {
      //   target: 'http://192.168.200.27/wapapi/',
      //   // target: 'http://hx.dev.ybjfu.com/ucapi/',
      //   pathRewrite: { '^/wapapi': '' },
      //   // changeOrigin: true,
      //   logLevel: 'debug'
      // },
      '/userinfo': {
        target: 'http://hx.dev.ybjfu.com/ucapi/userinfo',
        pathRewrite: { '^/userinfo': '' },
        // changeOrigin: true,
        logLevel: 'debug'
      },
      '/user': {
        target: 'http://192.168.200.27/ucapi/user',
        // target: 'http://hx.dev.ybjfu.com/ucapi/user',
        pathRewrite: { '^/user': '' },
        // changeOrigin: true,
        logLevel: 'debug'
      },
      '/footprint': {
        target: 'http://hx.dev.ybjfu.com/ucapi/footprint',
        pathRewrite: { '^/footprint': '' },
        // changeOrigin: true,
        logLevel: 'debug'
      },
      '/ucapi': {
        target: 'http://hx.dev.ybjfu.com/ucapi',
        pathRewrite: { '^/ucapi': '' },
        // changeOrigin: true,
        logLevel: 'debug'
      }
    }
  }
}
